<?php
require '../dao/location_dao.php';
$keyword=$_GET["keyword"];
$location=$_GET["location"];
$result = share($keyword, $location);
echo "02".$result;

function share($keyword, $location){
  $result = add($keyword, addcslashes($location, "\\"));//在反斜杠前加反斜杠，避免反斜杠被mysql吞掉。
  if($result){
    return "success";
  }else{
    return "fail".$result;
  }
}
 ?>
